The Design Notes API > The Design Notes C API > BOOL GetNote() |
![]() ![]() ![]() |
Description
Gets the value of the specified key in the specified Design Notes file.
Arguments
FileHandle
noteHandle
, const
char
keyName[64]
, char*
valueBuf
, int
valueBufLength
![]() |
The first argument is the file handle returned by OpenNotesFile() . |
![]() |
The second argument is a string containing the name of the key. |
![]() |
The third argument is the buffer where the value should be stored. |
![]() |
The fourth argument is the integer returned by GetNoteLength( noteHandle,keyName ) , indicating the maximum length of the value buffer. |
Returns
A Boolean value indicating whether the operation was successful; stores the value of the key in valueBuf
.
Example
The following code gets the value of the comments
key in the Design Notes file associated with welcome.html:
FileHandle noteHandle = OpenNotesFile("file:///c|sites/avocado8/¬ iwjs/welcome.html"); int valueLength = GetNotesLength( noteHandle, "comments"); char* valueBuffer = new char[valueLength + 1] GetNote(noteHandle, "comments", valueBuffer, valueLength + 1); printf("Comments: %s",valueBuffer); CloseNotesFile(noteHandle);
![]() ![]() ![]() |